package sf.view.fields;

import java.io.Serializable;

import javax.swing.JPanel;

import sf.model.fields.AbstractFieldModel;
import sf.model.fields.event.FieldChangeListener;

public abstract class AbstractField extends JPanel implements
		FieldChangeListener, Serializable
{
	protected String labelText = "label";
	protected boolean editable = true;

	public abstract AbstractFieldModel getModel();

	public abstract void setModel(AbstractFieldModel model);

	public abstract Object getValue();

	public abstract void setValue(Object value);

	public abstract void setEditable(boolean editable);

	public void clear()
	{
		setValue(null);
	}

	public String getLabelText()
	{
		return labelText;
	}

	public void setLabelText(String labelText)
	{
		this.labelText = labelText;
	}

}
